/*
 * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License").
 * You may not use this file except in compliance with the License.
 * A copy of the License is located at
 *
 *  http://aws.amazon.com/apache2.0
 *
 * or in the "license" file accompanying this file. This file is distributed
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

package com.amazonaws.services.rekognition.model;

import java.io.Serializable;

/**
 * <p>
 * A session settings object. It contains settings for the operation to be
 * performed. It accepts arguments for OutputConfig and AuditImagesLimit.
 * </p>
 */
public class CreateFaceLivenessSessionRequestSettings implements Serializable {
    /**
     * <p>
     * Can specify the location of an Amazon S3 bucket, where reference and
     * audit images will be stored. Note that the Amazon S3 bucket must be
     * located in the caller's AWS account and in the same region as the Face
     * Liveness end-point. Additionally, the Amazon S3 object keys are
     * auto-generated by the Face Liveness system. Requires that the caller has
     * the <code>s3:PutObject</code> permission on the Amazon S3 bucket.
     * </p>
     */
    private LivenessOutputConfig outputConfig;

    /**
     * <p>
     * Number of audit images to be returned back. Takes an integer between 0-4.
     * Any integer less than 0 will return 0, any integer above 4 will return 4
     * images in the response. By default, it is set to 0. The limit is best
     * effort and is based on the actual duration of the selfie-video.
     * </p>
     * <p>
     * <b>Constraints:</b><br/>
     * <b>Range: </b>0 - 4<br/>
     */
    private Integer auditImagesLimit;

    /**
     * <p>
     * Can specify the location of an Amazon S3 bucket, where reference and
     * audit images will be stored. Note that the Amazon S3 bucket must be
     * located in the caller's AWS account and in the same region as the Face
     * Liveness end-point. Additionally, the Amazon S3 object keys are
     * auto-generated by the Face Liveness system. Requires that the caller has
     * the <code>s3:PutObject</code> permission on the Amazon S3 bucket.
     * </p>
     *
     * @return <p>
     *         Can specify the location of an Amazon S3 bucket, where reference
     *         and audit images will be stored. Note that the Amazon S3 bucket
     *         must be located in the caller's AWS account and in the same
     *         region as the Face Liveness end-point. Additionally, the Amazon
     *         S3 object keys are auto-generated by the Face Liveness system.
     *         Requires that the caller has the <code>s3:PutObject</code>
     *         permission on the Amazon S3 bucket.
     *         </p>
     */
    public LivenessOutputConfig getOutputConfig() {
        return outputConfig;
    }

    /**
     * <p>
     * Can specify the location of an Amazon S3 bucket, where reference and
     * audit images will be stored. Note that the Amazon S3 bucket must be
     * located in the caller's AWS account and in the same region as the Face
     * Liveness end-point. Additionally, the Amazon S3 object keys are
     * auto-generated by the Face Liveness system. Requires that the caller has
     * the <code>s3:PutObject</code> permission on the Amazon S3 bucket.
     * </p>
     *
     * @param outputConfig <p>
     *            Can specify the location of an Amazon S3 bucket, where
     *            reference and audit images will be stored. Note that the
     *            Amazon S3 bucket must be located in the caller's AWS account
     *            and in the same region as the Face Liveness end-point.
     *            Additionally, the Amazon S3 object keys are auto-generated by
     *            the Face Liveness system. Requires that the caller has the
     *            <code>s3:PutObject</code> permission on the Amazon S3 bucket.
     *            </p>
     */
    public void setOutputConfig(LivenessOutputConfig outputConfig) {
        this.outputConfig = outputConfig;
    }

    /**
     * <p>
     * Can specify the location of an Amazon S3 bucket, where reference and
     * audit images will be stored. Note that the Amazon S3 bucket must be
     * located in the caller's AWS account and in the same region as the Face
     * Liveness end-point. Additionally, the Amazon S3 object keys are
     * auto-generated by the Face Liveness system. Requires that the caller has
     * the <code>s3:PutObject</code> permission on the Amazon S3 bucket.
     * </p>
     * <p>
     * Returns a reference to this object so that method calls can be chained
     * together.
     *
     * @param outputConfig <p>
     *            Can specify the location of an Amazon S3 bucket, where
     *            reference and audit images will be stored. Note that the
     *            Amazon S3 bucket must be located in the caller's AWS account
     *            and in the same region as the Face Liveness end-point.
     *            Additionally, the Amazon S3 object keys are auto-generated by
     *            the Face Liveness system. Requires that the caller has the
     *            <code>s3:PutObject</code> permission on the Amazon S3 bucket.
     *            </p>
     * @return A reference to this updated object so that method calls can be
     *         chained together.
     */
    public CreateFaceLivenessSessionRequestSettings withOutputConfig(
            LivenessOutputConfig outputConfig) {
        this.outputConfig = outputConfig;
        return this;
    }

    /**
     * <p>
     * Number of audit images to be returned back. Takes an integer between 0-4.
     * Any integer less than 0 will return 0, any integer above 4 will return 4
     * images in the response. By default, it is set to 0. The limit is best
     * effort and is based on the actual duration of the selfie-video.
     * </p>
     * <p>
     * <b>Constraints:</b><br/>
     * <b>Range: </b>0 - 4<br/>
     *
     * @return <p>
     *         Number of audit images to be returned back. Takes an integer
     *         between 0-4. Any integer less than 0 will return 0, any integer
     *         above 4 will return 4 images in the response. By default, it is
     *         set to 0. The limit is best effort and is based on the actual
     *         duration of the selfie-video.
     *         </p>
     */
    public Integer getAuditImagesLimit() {
        return auditImagesLimit;
    }

    /**
     * <p>
     * Number of audit images to be returned back. Takes an integer between 0-4.
     * Any integer less than 0 will return 0, any integer above 4 will return 4
     * images in the response. By default, it is set to 0. The limit is best
     * effort and is based on the actual duration of the selfie-video.
     * </p>
     * <p>
     * <b>Constraints:</b><br/>
     * <b>Range: </b>0 - 4<br/>
     *
     * @param auditImagesLimit <p>
     *            Number of audit images to be returned back. Takes an integer
     *            between 0-4. Any integer less than 0 will return 0, any
     *            integer above 4 will return 4 images in the response. By
     *            default, it is set to 0. The limit is best effort and is based
     *            on the actual duration of the selfie-video.
     *            </p>
     */
    public void setAuditImagesLimit(Integer auditImagesLimit) {
        this.auditImagesLimit = auditImagesLimit;
    }

    /**
     * <p>
     * Number of audit images to be returned back. Takes an integer between 0-4.
     * Any integer less than 0 will return 0, any integer above 4 will return 4
     * images in the response. By default, it is set to 0. The limit is best
     * effort and is based on the actual duration of the selfie-video.
     * </p>
     * <p>
     * Returns a reference to this object so that method calls can be chained
     * together.
     * <p>
     * <b>Constraints:</b><br/>
     * <b>Range: </b>0 - 4<br/>
     *
     * @param auditImagesLimit <p>
     *            Number of audit images to be returned back. Takes an integer
     *            between 0-4. Any integer less than 0 will return 0, any
     *            integer above 4 will return 4 images in the response. By
     *            default, it is set to 0. The limit is best effort and is based
     *            on the actual duration of the selfie-video.
     *            </p>
     * @return A reference to this updated object so that method calls can be
     *         chained together.
     */
    public CreateFaceLivenessSessionRequestSettings withAuditImagesLimit(Integer auditImagesLimit) {
        this.auditImagesLimit = auditImagesLimit;
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getOutputConfig() != null)
            sb.append("OutputConfig: " + getOutputConfig() + ",");
        if (getAuditImagesLimit() != null)
            sb.append("AuditImagesLimit: " + getAuditImagesLimit());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode
                + ((getOutputConfig() == null) ? 0 : getOutputConfig().hashCode());
        hashCode = prime * hashCode
                + ((getAuditImagesLimit() == null) ? 0 : getAuditImagesLimit().hashCode());
        return hashCode;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof CreateFaceLivenessSessionRequestSettings == false)
            return false;
        CreateFaceLivenessSessionRequestSettings other = (CreateFaceLivenessSessionRequestSettings) obj;

        if (other.getOutputConfig() == null ^ this.getOutputConfig() == null)
            return false;
        if (other.getOutputConfig() != null
                && other.getOutputConfig().equals(this.getOutputConfig()) == false)
            return false;
        if (other.getAuditImagesLimit() == null ^ this.getAuditImagesLimit() == null)
            return false;
        if (other.getAuditImagesLimit() != null
                && other.getAuditImagesLimit().equals(this.getAuditImagesLimit()) == false)
            return false;
        return true;
    }
}
